package com.wechat.project.wechatproject.web;

import com.wechat.project.wechatproject.entity.City;
import com.wechat.project.wechatproject.mapper.CityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Controller {

    @Autowired
    CityMapper cityMapper;

    @GetMapping("/getCityId")
    public List<City> getCity(String key){
        return cityMapper.selectCityByEnOrZh(key);
    }
}
